package cn.xz.kjg.adapter

import android.graphics.drawable.Drawable
import android.widget.TextView
import cn.xz.kjg.R
import cn.xz.kjg.bean.AreaList
import cn.xz.kjg.bean.HP
import cn.xz.kjg.util.AppHelper
import cn.xz.kjg.widgets.XZTextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * 分屏列表适配器*/
class U3dAdapter: BaseQuickAdapter<HP, BaseViewHolder>(R.layout.item_u3d), LoadMoreModule {

    override fun convert(holder: BaseViewHolder, item: HP) {

        val tvLightTxt = holder.getView<TextView>(R.id.tv_txt)
        tvLightTxt.text = item.name.toString()

        var mH: Drawable? = null
        if (item.select){
            mH = AppHelper.getDrawable(R.mipmap.icon_s3)
        }
        tvLightTxt.background = mH
    }
}